<script type="text/javascript">
    function do_open_layout(event, treeId, treeNode) {
        if (treeNode.isParent) {
            var zTree = $.fn.zTree.getZTreeObj(treeId)

            zTree.expandNode(treeNode)
            return
        }
        $(event.target).bjuiajax('doLoad', {url:treeNode.url, target:treeNode.divid})

        event.preventDefault()
    }
</script>
<div class="bjui-pageContent">
    <div style="float:left; width:200px;">
        <ul id="layout-tree" class="ztree" data-toggle="ztree" data-expand-all="true" data-on-click="do_open_layout">
            <#list bizUnits as bizUnit>
                <li data-id="${bizUnit.id!}" data-pid="0">${(bizUnit.note)!}</li>
                <#--<#assign ags = agentMap[bizUnit.id]>-->
                <#assign ags=((agentMap[bizUnit.id])!)>
                <#list ags as ag>
                    <li data-id="${(ag.id)!}" data-pid="${bizUnit.id!}" data-url="/admin/agent/node?agentId=${(ag.id)!}" data-divid="#layout">${(ag.name)!}</li>
                </#list>
            </#list>
        </ul>
    </div>

    <div id="layout" style="margin-left:210px; height:99.9%; overflow:hidden;">

    </div>
</div>